<script>
  import { BASE_URL } from '@/store/constant'
  
  export default {
    onLaunch: function() {
      console.log('App Launch')
      console.log('userInfo', uni.getStorageSync('USER_INFO'))
      // 保存 BASE_URL, 活体检测时需要获取
      uni.setStorageSync('BASE_URL', BASE_URL)
      // 启动app时获取本地缓存的数据
      this.$store.commit('SET_TOKEN', uni.getStorageSync('ACCESS_TOKEN'))
      this.$store.commit('SET_USER_INFO', uni.getStorageSync('USER_INFO'))
    },
    onShow: function() {
      console.log('App Show')
    },
    onHide: function() {
      console.log('App Hide')
    }
  }
</script>

<style lang="less">
  /** 引入 ColorUi */
  @import "colorui/main.css";
  @import "colorui/icon.css";
  @import "colorui/animation.css";
  /*每个页面公共css */
  .main-color {
    color: #ffc27e;
  }

  .h100 {
    // height: calc(100vh - 88rpx);
    height: 100vh;
  }

  .w100 {
    width: 100%;
  }

  .text-underline {
    text-decoration: underline;
  }

  .border-top {
    border-top: 2rpx solid #eee;
  }
  .border-left {
    border-left: 2rpx solid #eee;
  }
  .border-right {
    border-right: 2rpx solid #eee;
  }
  .border-bottom {
    border-bottom: 2rpx solid #eee;
  }

  .ovh {
    overflow: hidden;
  }

  .text-cut-2 { // 文字2行截断
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .text-cut-3 { // 文字3行截断
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .no-data {
    image {
      width: 400rpx;
    }
  }

  .uni-input-placeholder,
  .uni-textarea-placeholder {
    color: #b2b2b2;
  }

  .cu-list.menu>.cu-item.arrow:before {
    color: #666;
  }

  .cu-form-group .title { // 统一form内的title宽度
    min-width: calc(4em + 15px);
  }

  .dm-btn {
    height: 96rpx;
  }
  /** 订单卡片 Start */
  .order-list-box {
    position: relative;
    z-index: 2;
  }

  .order-card {
    min-height: 260rpx;
    .header {
      width: 100%;
    }

    .product-img {
      width: 150rpx;
      height: 150rpx;
    }

    .details {
      height: 150rpx;
      flex-direction: column-reverse;
    }
  }
  /** 订单卡片 End */
</style>
